import axios from "../utils/axiosUtils";

/**
 * 获取所有商品数据
 * @returns 
 */
export const findAllProductApi = ()=>{
    return axios.get("/goods/findGoods")
}

/**
 * 模糊搜索商品数据
 * @param {*} data 
 * @returns 
 */
export const findProductBySearchDataApi = (data)=>{
    return axios.post("/goods/findGoodsByName",data)
}

/**
 * 添加商品
 * @param {*} data 
 * @returns 
 */
export const addProductApi = (data)=>{
    return axios.post("/goods/addGoods",data)
}

export const findProductById = (data)=>{
    return axios.post("/goods/findGoodsById",data)
}